Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: fixup testing for specific N-API version #840

Merged
merged 1 commit into from
Nov 26, 2020

Conversation

mhdawson
Copy link
Member

Fixup testing for a specific N-API version
and document.

Fixup testing for a specific N-API version
and document.
@mhdawson
Copy link
Member Author

@KevinEady, @legendecas I don't think the linting is working correctly. It's reporting problems in files I've not changed.

Copy link
Member

@NickNaso NickNaso left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@legendecas
Copy link
Member

@mhdawson the check is comparing the local master with the current PR branch. So on the CI, it will compare with the latest master. We have to update the PR branch with the latest master branch to make sure the diff do not include changes landed on master after the fork of the development branch.

@mhdawson
Copy link
Member Author

@legendecas I'm not following what we need to fix this?

@legendecas
Copy link
Member

legendecas commented Nov 26, 2020

@mhdawson Sorry but maybe I'm misunderstanding the problem. I didn't find the CI is failing. Can you help me explain what failure you're referring to and how to reproduce?

@mhdawson
Copy link
Member Author

@legendecas it was reporting failures when I ran locally and I had to add the comment to ingore the pre-commit checks.

@mhdawson mhdawson merged commit 356e93d into nodejs:master Nov 26, 2020
@legendecas
Copy link
Member

legendecas commented Nov 27, 2020

@mhdawson ok. The linter compares the current working branch with the local master branch. If the local master branch is not up to date or contains the latest commits that not linted, which commits the working branch doesn't include, then the diff will include those unrelated commits and the linter will complain about them.

Keep local branches up to date will mediate the problem but since the checks depend on those diffs, it is not always reliable locally. However, branches on the CI will always be updated.

@mhdawson
Copy link
Member Author

@legendecas that may cause people confusion/trouble since I'm not sure how many people keep their local master branch up to date.

@KevinEady
Copy link
Contributor

@mhdawson FWIW, the script allows you to specify a process env CLANG_FORMAT_START, eg upstream/master .. but yes, it definitely caused me confusion/trouble, which is how I stumbled across this setting 🤷

@legendecas
Copy link
Member

The local master branch might not always tracking nodejs/node-addon-api but rather someones-fork/node-addon-/api so I didn't comparing with local upstream/master or some-local-remote/master.

Maybe we can print instructions when the check failed how to fix the local check to improve the experience.

kevindavies8 added a commit to kevindavies8/node-addon-api-Develop that referenced this pull request Aug 24, 2022
Fixup testing for a specific N-API version
and document.

Reviewed-By: NickNaso <[email protected]>
PR-URL: nodejs/node-addon-api#840
Marlyfleitas added a commit to Marlyfleitas/node-api-addon-Development that referenced this pull request Aug 26, 2022
Fixup testing for a specific N-API version
and document.

Reviewed-By: NickNaso <[email protected]>
PR-URL: nodejs/node-addon-api#840
wroy7860 added a commit to wroy7860/addon-api-benchmark-node that referenced this pull request Sep 19, 2022
Fixup testing for a specific N-API version
and document.

Reviewed-By: NickNaso <[email protected]>
PR-URL: nodejs/node-addon-api#840
johnfrench3 pushed a commit to johnfrench3/node-addon-api-git that referenced this pull request Aug 11, 2023
Fixup testing for a specific N-API version
and document.

Reviewed-By: NickNaso <[email protected]>
PR-URL: nodejs/node-addon-api#840
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants